package com.marry.business.service.active.impl;

import com.marry.business.entity.Active;
import com.marry.business.repository.active.ActiveRepository;
import com.marry.business.service.active.ActiveService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;
import reactor.core.publisher.Flux;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;

/**
 * @program: marry-cloud
 * @description:
 * @author: 杨超
 * @create: 2021-08-19 17:29
 **/
@Service
public class ActiveServiceImpl implements ActiveService {
    @Autowired
    ActiveRepository activeRepository;


    @Override
    public Flux<Active> save(Active... actives) {
        List<Active> activeList = Arrays.asList(actives);
        return  activeRepository.saveAll(activeList);
    }
}
